<?php

namespace App\Crontab;

use EasySwoole\EasySwoole\Crontab\AbstractCronTask;

class TestCrontab extends AbstractCronTask
{

    public static function getRule(): string
    {
        // TODO: Implement getRule() method.
        // 定义执行规则 根据Crontab来定义
        return '30 9 * * *';
    }

    public static function getTaskName(): string
    {
        // TODO: Implement getTaskName() method.
        return "test"; // 任务名称
    }

    function run(int $taskId, int $workerIndex)
    {
        // TODO: Implement run() method.

    }

    function onException(\Throwable $throwable, int $taskId, int $workerIndex)
    {
        // TODO: Implement onException() method.
    }
}